package demo1103.demo03;

import java.util.function.Function;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/3 14:49
 */
public class TestFunction {
    public static void main(String[] args) {
        Function<String,Integer> function = s -> {
            return s.length();
        };
        length(function,"1234");
    }
    public static void length(Function<String,Integer> function,String s){
        Integer integer = function.apply(s);
        System.out.println(integer);
    }
}
